﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace PMS
{
    public class SystemMessage
    {
        public static void SendSystemMessage(BD_SystemMessage message)
        {
            if (string.IsNullOrEmpty(message.FillTime))
            {
                message.FillTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            }
            if (string.IsNullOrEmpty(message.Title))
            {
                message.Title = "系统消息";
            }
            message.FromName = "系统消息";
            message.State = "0";
            DALSession.Current.BD_SystemMessageDAL.Add(message);
            DALSession.Current.Savechanges();
        }
    }
}